import 'package:flutter/material.dart';

class CustomShape extends CustomPainter {
  final Color? bgColor;
  late Paint _paint;
  var path = Path();

  CustomShape(this.bgColor) {
    _paint = Paint();
  }

  @override
  void paint(Canvas canvas, Size size) {
    _paint.color = bgColor!;
    path.reset();
    path.lineTo(-5, 0);
    path.lineTo(0, 10);
    path.lineTo(5, 0);
    canvas.drawPath(path, _paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}
